package impl.comp;

import java.util.ArrayList;
import java.util.Date;
import java.util.Hashtable;

import contraintes.CreneauNonExploitable;
import interfaces.IEmploiDuTemps;
import reservation.PlageHoraire;

public class EmploiDuTempsImpl /*extends EmploiDuTemps*/ {

	private Hashtable<Integer,PlageHoraire> listPH = new Hashtable<Integer,PlageHoraire>();
	private ArrayList<CreneauNonExploitable> listCNE = new ArrayList<CreneauNonExploitable>();

	protected IEmploiDuTemps iedt() {
		// TODO Auto-generated method stub
		return new IEmploiDuTemps() {

			public PlageHoraire demanderCreneau(Date limite, int dure) {
				// TODO Auto-generated method stub
				return null;
			}

			public boolean reserverCreneau(int idPh, int proprio) {
				// TODO Auto-generated method stub
				if(listPH.get(idPh).getProprio()==-1) {
					listPH.get(idPh).setProprio(proprio);
					return true;
				}
				return false;
			}
		};
	}

}
